import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/home',
    name: 'home',
    component: () => import(/* webpackChunkName: "about" */ '../views/HomeView.vue')
  },
  {
    path: '/Cart',
    name: 'Cart',
    component: () => import(/* webpackChunkName: "about" */ '../views/CartView.vue')
  },
  {
    path: '/ProDetail', 
    name: 'ProDetail',
    component: () => import(/* webpackChunkName: "about" */ '../views/ProductDetailView.vue'),
  },
  {
    path: '/ProList', 
    name: 'ProList',
    component: () => import(/* webpackChunkName: "about" */ '../views/ProductListView.vue'),
  },
  {
    path: '/Register', 
    name: 'Register',
    component: () => import(/* webpackChunkName: "about" */ '../views/RegisterView.vue'),
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
